3.4.86 \(\int \frac {1}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx\) [386]

Optimal. Leaf size=46 \[ \frac {\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]

[Out]

arctanh(sin(f*x+e))*cos(f*x+e)/f/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2820, 3855} \begin {gather*} \frac {\cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]]),x]

[Out]

(ArcTanh[Sin[e + f*x]]*Cos[e + f*x])/(f*Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]])

Rule 2820

Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Di
st[Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), Int[1/Cos[e + f*x], x], x] /; FreeQ[{a, b
, c, d, e, f}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx &=\frac {\cos (e+f x) \int \sec (e+f x) \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.14, size = 89, normalized size = 1.93 \begin {gather*} -\frac {\cos (e+f x) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{f \sqrt {a (1+\sin (e+f x))} \sqrt {c-c \sin (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]]),x]

[Out]

-((Cos[e + f*x]*(Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]))/(f*Sqrt
[a*(1 + Sin[e + f*x])]*Sqrt[c - c*Sin[e + f*x]]))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(91\) vs. \(2(42)=84\).
time = 10.66, size = 92, normalized size = 2.00

method result size
default \(-\frac {\left (\ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-\ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )\right ) \cos \left (f x +e \right )}{f \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}\) \(92\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/f*(ln(-(-1+cos(f*x+e)+sin(f*x+e))/sin(f*x+e))-ln(-(-1+cos(f*x+e)-sin(f*x+e))/sin(f*x+e)))*cos(f*x+e)/(a*(1+
sin(f*x+e)))^(1/2)/(-c*(sin(f*x+e)-1))^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)), x)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 170, normalized size = 3.70 \begin {gather*} \left [\frac {\sqrt {a c} \log \left (-\frac {a c \cos \left (f x + e\right )^{3} - 2 \, a c \cos \left (f x + e\right ) - 2 \, \sqrt {a c} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c} \sin \left (f x + e\right )}{\cos \left (f x + e\right )^{3}}\right )}{2 \, a c f}, -\frac {\sqrt {-a c} \arctan \left (\frac {\sqrt {-a c} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c}}{a c \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right )}{a c f}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(a*c)*log(-(a*c*cos(f*x + e)^3 - 2*a*c*cos(f*x + e) - 2*sqrt(a*c)*sqrt(a*sin(f*x + e) + a)*sqrt(-c*si
n(f*x + e) + c)*sin(f*x + e))/cos(f*x + e)^3)/(a*c*f), -sqrt(-a*c)*arctan(sqrt(-a*c)*sqrt(a*sin(f*x + e) + a)*
sqrt(-c*sin(f*x + e) + c)/(a*c*cos(f*x + e)*sin(f*x + e)))/(a*c*f)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e))**(1/2),x)

[Out]

Integral(1/(sqrt(a*(sin(e + f*x) + 1))*sqrt(-c*(sin(e + f*x) - 1))), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):Ch
eck [abs(co

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^(1/2)),x)

[Out]

int(1/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^(1/2)), x)

________________________________________________________________________________________